home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / MPW Oberon 2.1168 / OExamples / EditCDEV.r < prev    next >
Encoding:
Text File  |  1994-11-02  |  3.0 KB  |  124 lines  |  [TEXT/MPS ]

  1. /*------------------------------------------------------------------------------
  2. #
  3. #    Macintosh Developer Technical Support
  4. #
  5. #    EditText Sample Control Panel Device
  6. #
  7. #    EditCDEV
  8. #
  9. #    EditCDEV.make    -    Make Source
  10. #
  11. #    Copyright © 1988 Apple Computer, Inc.
  12. #    All rights reserved.
  13. #
  14. #    Versions:    1.0                    8/88
  15. #
  16. #    Components:    EditCDEV.c            August 1, 1988
  17. #                EditCDEV.r            August 1, 1988
  18. #                EditCDEV.make        August 1, 1988
  19. #
  20. #    EditCDEV is a sample Control Panel device (cdev) that 
  21. #    demonstrates the usage of the edit-related messages.  
  22. #    EditCDEV demonstrates how to implement an editText item
  23. #    in a Control Panel Device.  It utilizes the new undo, cut, copy,
  24. #    paste, and delete messages that are sent to cdevs in
  25. #    response to user menu selections.
  26. #
  27. #    It is comprised of two editText items that can be edited 
  28. #    and moved between via the mouse or tab key.
  29. #
  30. ------------------------------------------------------------------------------*/
  31.  
  32.  
  33. #include "Types.r"
  34. #include "SysTypes.r"
  35.  
  36. type 'hack' as 'STR ';
  37.  
  38. resource 'vers' (1) {
  39.     0x01, 0x00, release, 0x00,
  40.     verUS,
  41.     "1.00",
  42.     "1.00, Copyright © 1988 Apple Computer, Inc."
  43. };
  44.  
  45. type 'nrct' {
  46.     integer = $$CountOf(RectArray);
  47.     array RectArray { rect; };
  48. };
  49.  
  50. type 'mach' {
  51.     unsigned hex integer;    /* Softmask */
  52.     unsigned hex integer;    /* Hardmask */
  53. };
  54.  
  55. resource 'hack' (0, purgeable) {
  56.     "Control Panel Device, INIT and CODE by Macintosh Developer Technical Support"
  57. };
  58.  
  59. resource 'BNDL' (-4064, purgeable) {
  60.     'hack', 0,
  61.     {    'ICN#', {0, -4064},
  62.         'FREF', {0, -4064}
  63.     }
  64. };
  65.  
  66. resource 'ICN#' (-4064, purgeable) {
  67.     { /* array: 2 elements */
  68.         /* [1] */
  69.         $"00 00 00 00 00 00 3F E0 00 00 48 10 00 00 44 10"
  70.         $"00 01 83 10 00 02 01 90 00 04 01 90 00 04 01 90"
  71.         $"00 04 01 90 00 04 03 90 00 04 02 90 00 04 02 90"
  72.         $"00 08 02 90 00 08 02 90 00 10 06 90 00 20 0C 90"
  73.         $"03 C0 18 90 04 00 3F 10 0F FF C0 10 08 00 00 10"
  74.         $"08 00 00 10 08 00 00 10 08 00 FF 10 08 00 00 10"
  75.         $"08 00 00 10 08 00 00 10 08 00 00 10 07 FF FF E0"
  76.         $"04 00 00 20 04 00 00 20 04 00 00 20 07 FF FF E0",
  77.         /* [2] */
  78.         $"00 00 00 00 00 00 3F E0 00 00 7F F0 00 00 7F F0"
  79.         $"00 01 FF F0 00 03 FF F0 00 07 FF F0 00 07 FF F0"
  80.         $"00 07 FF F0 00 07 FF F0 00 07 FF F0 00 07 FF F0"
  81.         $"00 0F FF F0 00 0F FF F0 00 1F FF F0 00 3F FF F0"
  82.         $"03 FF FF F0 07 FF FF F0 0F FF FF F0 0F FF FF F0"
  83.         $"0F FF FF F0 0F FF FF F0 0F FF FF F0 0F FF FF F0"
  84.         $"0F FF FF F0 0F FF FF F0 0F FF FF F0 07 FF FF E0"
  85.         $"07 FF FF E0 07 FF FF E0 07 FF FF E0 07 FF FF E0"
  86.     }
  87. };
  88.  
  89. resource 'DITL' (-4064) {
  90.     { /* array DITLarray: 1 elements */
  91.         /* [1] */
  92.         {60, 110, 76, 280},
  93.         EditText {
  94.             enabled, ""
  95.         };
  96.         /* [2] */
  97.         {85, 110, 101, 280},
  98.         EditText {
  99.             enabled, ""
  100.         };
  101.         /* [3] */
  102.         {15, 110, 50, 280},
  103.         StaticText {
  104.             disabled, "Apple Macintosh Developer Technical Support TextEdit Control Panel Device Example © 1988"
  105.         }
  106.     }
  107. };
  108.  
  109. resource 'FREF' (-4064, purgeable) {
  110.     'cdev', 0, ""
  111. };
  112.  
  113. resource 'nrct' (-4064, purgeable) {
  114.     {    /* array RectArray: 1 elements */
  115.         /* [1] */
  116.         {-1, 87, 130, 322}
  117.     }
  118. };
  119.  
  120. resource 'mach' (-4064, purgeable) {
  121.     0xFFFF,
  122.     0
  123. };
  124.